package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.JpushAccountEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 极光账号对象 jpush_account
 *
 * @author ym
 * @date 2020-08-21
 */
@ApiModel("极光账号-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JpushAccountUpdateParam extends BeanCovert<JpushAccountEntity> {

	@ApiModelProperty("主键")
	@NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
	private Long id;

	@ApiModelProperty("用户id")
	@NotNull(message = "用户id不能为空", groups = {Add.class, Update.class})
	private Long userId;

	@ApiModelProperty("云信账号")
	@NotEmpty(message = "云信账号不能为空", groups = {Add.class, Update.class})
	@Size(max = 32, message = "云信账号长度超过{max}", groups = {Add.class, Update.class})
	private String account;

	@ApiModelProperty("创建时间")
	@NotNull(message = "创建时间不能为空", groups = Add.class)
	private Date createTime;

	@ApiModelProperty("账号类型.01安卓02IOS")
	@NotEmpty(message = "账号类型.01安卓02IOS不能为空", groups = {Add.class, Update.class})
	@Size(max = 32, message = "账号类型.01安卓02IOS长度超过{max}", groups = {Add.class, Update.class})
	private String type;

}
